﻿package mortal.game.view.wardrobe.util
{
    import Message.Public.*;
    import mortal.game.cache.*;
    import mortal.game.view.palyer.data.*;
    import mortal.game.view.wardrobe.*;

    public class WardrobeUtil extends Object
    {

        public function WardrobeUtil()
        {
            return;
        }// end function

        public static function getShapCodeByType(param1:int) : int
        {
            var _loc_2:int = 0;
            var _loc_3:FashionAdvanceData = null;
            switch(WardrobeWin.currSelWardrobe)
            {
                case EAdvanceComponentType._EAdvanceComponentTypeClothes:
                case EAdvanceComponentType._EAdvanceComponentTypeWing:
                case EAdvanceComponentType._EAdvanceComponentTypeWeapon:
                {
                    _loc_3 = Cache.instance.fashion.getFashionInfo(WardrobeWin.currSelWardrobe);
                    if (_loc_3 && _loc_3.advanceInfo)
                    {
                        _loc_2 = _loc_3.advanceInfo.shapeCode;
                    }
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypePet:
                {
                    _loc_2 = Cache.instance.newPet.pet.sharpId;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMount:
                {
                    _loc_2 = Cache.instance.mount.mountData.sPublicMount.sharpId;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

    }
}
